Developer Documentation

QuickTime 4 API Documentation

3D Graphics Programming with QuickDraw 3D 1.5.4

Previous | QD3D Book | Overview | Chapter Contents | Next |

Attaching File Objects to Storage Objects

To read data from or write data to a file object, you must first attach the file object to a storage object. QuickDraw 3D provides routines you can use to get and set the current storage object for a file object.

Q3File_GetStorage

You can use the Q3File_GetStorage function to get the current storage object for a file object.

TQ3Status Q3File_GetStorage (
                     TQ3FileObject file,
                     TQ3StorageObject *storage);
file
A file object.
storage
On exit, the storage object currently attached to the specified file object.

DESCRIPTION

The Q3File_GetStorage function returns, in the storage parameter, the storage object currently attached to the file object specified by the file parameter.

ERRORS

kQ3ErrorInvalidObject kQ3ErrorNULLParameter

Q3File_SetStorage

You can use the Q3File_SetStorage function to set the storage object for a file object.

TQ3Status Q3File_SetStorage (
                     TQ3FileObject file,
                     TQ3StorageObject storage);
file
A file object.
storage
A storage object, or NULL .

DESCRIPTION

The Q3File_SetStorage function attaches the file object specified by the file parameter to the storage object specified by the storage parameter. The reference count of the storage object is incremented. You can pass the value NULL in the storage parameter to clear a file object's storage.

You cannot attach the same storage object to more than one file object.

ERRORS

kQ3ErrorFileAlreadyOpen kQ3ErrorInvalidObject kQ3ErrorStorageInUse


© 1997 Apple Computer, Inc.

Previous | QD3D Book | Overview | Chapter Contents | Next |